From 2a08ec012e6036797d323cb22b0c10cb5cccc625 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 06:41:14 +0000 Subject: [PATCH 01/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c8fdc5..411946e 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-multi": "^0.1.0", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/symbol-iterator": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", "@stdlib/utils-keys": "^0.1.0", From fb621e699aaaffefa007766838d07f2d9be355e3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 16:45:00 +0000 Subject: [PATCH 02/86] 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 | 41 +- 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 | 76 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6204 insertions(+), 3522 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -114,7 +113,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]. diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 3c669e7..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/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 91af5b9..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..50caa86 --- /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 r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";var d={};r(d,"nditerColumns",t),r(d,"nditerRows",s),r(d,"nditer2arrayEach",e);export{d as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f5763f4 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerRows","nditer2arrayEach"],"mappings":";;qsBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,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 80d10f8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,69 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 411946e..9f63084 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.0", "description": "Multidimensional array iterators.", "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", - "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,55 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "github:stdlib-js/ndarray-iter-columns#main", - "@stdlib/ndarray-iter-rows": "github:stdlib-js/ndarray-iter-rows#main", - "@stdlib/ndarray-iter-to-array-each": "github:stdlib-js/ndarray-iter-to-array-each#main", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-array": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.0", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.0", - "@stdlib/ndarray-base-slice": "github:stdlib-js/ndarray-base-slice#main", - "@stdlib/ndarray-slice": "github:stdlib-js/ndarray-slice#main", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-multi": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/symbol-iterator": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -106,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6a41a15 --- /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 b4def96..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +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 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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 cfbfdf217176e5c520d41db1e2bb61aa545af078 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 4 Oct 2023 11:51:53 +0000 Subject: [PATCH 03/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 098794f..8c2a425 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-multi": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 6469d679abb9c27347f1ca4dd37453f43af043a9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 4 Oct 2023 17:40:00 +0000 Subject: [PATCH 04/86] Remove files --- index.d.ts | 44 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6226 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 86cae23..0000000 --- a/index.d.ts +++ /dev/null @@ -1,44 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Iterator for iterating over matrix rows. - */ - nditerRows: typeof nditerRows; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 50caa86..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 r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";var d={};r(d,"nditerColumns",t),r(d,"nditerRows",s),r(d,"nditer2arrayEach",e);export{d as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f5763f4..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerRows","nditer2arrayEach"],"mappings":";;qsBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,mBAAAI"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6a41a15..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From d14fd92099c8b850d9ccabe6f46e69688afae4f4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 4 Oct 2023 17:40:59 +0000 Subject: [PATCH 05/86] 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 | 41 +- 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 | 81 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6204 insertions(+), 3536 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -114,7 +113,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]. diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 7d577a7..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/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 9fa42ef..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..03951bd --- /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 r 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/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";var i={};r(i,"nditerColumns",e),r(i,"nditerIndices",s),r(i,"nditerRows",t),r(i,"nditer2arrayEach",d);export{i as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..90f6ce3 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerIndices","nditerRows","nditer2arrayEach"],"mappings":";;44BAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,mBAAAK"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index fb9fe22..0000000 --- a/lib/index.js +++ /dev/null @@ -1,78 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 8c2a425..9f63084 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.0", "description": "Multidimensional array iterators.", "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", - "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,60 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "github:stdlib-js/ndarray-iter-columns#main", - "@stdlib/ndarray-iter-indices": "github:stdlib-js/ndarray-iter-indices#main", - "@stdlib/ndarray-iter-rows": "github:stdlib-js/ndarray-iter-rows#main", - "@stdlib/ndarray-iter-to-array-each": "github:stdlib-js/ndarray-iter-to-array-each#main", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "github:stdlib-js/ndarray-base-slice#main", - "@stdlib/ndarray-slice": "github:stdlib-js/ndarray-slice#main", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-multi": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -111,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d01e6af --- /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 b4def96..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +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 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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 3066e94e55b8a23d3a53fb69fadc02abada3b2d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 09:02:42 +0000 Subject: [PATCH 06/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b801c5..9d313d9 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-multi": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 543e409b46c9aa5cbec147459aaf7cd9af08cb71 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 14:46:07 +0000 Subject: [PATCH 07/86] Remove files --- index.d.ts | 44 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6226 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 86cae23..0000000 --- a/index.d.ts +++ /dev/null @@ -1,44 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Iterator for iterating over matrix rows. - */ - nditerRows: typeof nditerRows; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 03951bd..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 r 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/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";var i={};r(i,"nditerColumns",e),r(i,"nditerIndices",s),r(i,"nditerRows",t),r(i,"nditer2arrayEach",d);export{i as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 90f6ce3..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerIndices","nditerRows","nditer2arrayEach"],"mappings":";;44BAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,mBAAAK"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d01e6af..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From db89b56b486bd245cb8d37222d439c608653ad1a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 14:47:20 +0000 Subject: [PATCH 08/86] 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 | 41 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6204 insertions(+), 3559 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -114,7 +113,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]. diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..29d4d3c --- /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 e 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/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9758f14 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;uxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 9d313d9..9f63084 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "github:stdlib-js/ndarray-iter-columns#main", - "@stdlib/ndarray-iter-entries": "github:stdlib-js/ndarray-iter-entries#main", - "@stdlib/ndarray-iter-indices": "github:stdlib-js/ndarray-iter-indices#main", - "@stdlib/ndarray-iter-rows": "github:stdlib-js/ndarray-iter-rows#main", - "@stdlib/ndarray-iter-to-array-each": "github:stdlib-js/ndarray-iter-to-array-each#main", - "@stdlib/ndarray-iter-values": "github:stdlib-js/ndarray-iter-values#main", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-copy-indexed": "^0.1.0", - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "github:stdlib-js/ndarray-base-next-cartesian-index#main", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "github:stdlib-js/ndarray-base-slice#main", - "@stdlib/ndarray-slice": "github:stdlib-js/ndarray-slice#main", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-multi": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..1b1b901 --- /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 b4def96..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +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 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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 d841db91bcb0f76bcea1a5c6fb938f2787e365ce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 19:26:21 +0000 Subject: [PATCH 09/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d0e0af9..51bca86 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-multi": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From e4e004b8d898052ea9d84cade11afe9bca856b6f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 19:26:48 +0000 Subject: [PATCH 10/86] Remove files --- index.d.ts | 44 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6226 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 86cae23..0000000 --- a/index.d.ts +++ /dev/null @@ -1,44 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Iterator for iterating over matrix rows. - */ - nditerRows: typeof nditerRows; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 29d4d3c..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 e 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/ndarray-iter-columns@esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9758f14..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;uxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 1b1b901..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From fb91d618b300e98a095276879ce783ebbff28fee Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 19:28:08 +0000 Subject: [PATCH 11/86] 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 | 41 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6204 insertions(+), 3560 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -114,7 +113,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]. diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..217d33a --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..af5de45 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 51bca86..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "github:stdlib-js/ndarray-slice#main", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-multi": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de201f2 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 3d01ca1e0ac742a89de685bd739a5f682cc4cb6e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 19:28:31 +0000 Subject: [PATCH 12/86] 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 82e762f..b51608e 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/ndarray-iter@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.1.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { nditer2arrayEach, nditerColumns, nditerEntries, nditerIndices, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@esm/index.mjs'; +import { nditer2arrayEach, nditerColumns, nditerEntries, nditerIndices, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.1.0-esm/index.mjs'; ``` #### ns @@ -83,7 +83,7 @@ var o = ns; - - - - From fc609afd6ae7331811bc243096cf314eb46626a5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Oct 2023 20:39:44 +0000 Subject: [PATCH 16/86] 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 | 53 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3566 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..217d33a --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..af5de45 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 7726521..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..80ace71 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 e8a9e5d521acb70a8e5c0a4a488b858e71cd5c6e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:05:50 +0000 Subject: [PATCH 17/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79bf300..7726521 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 7c112ebf47a6db31cec8bf8195eac6b130b5e649 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:14:54 +0000 Subject: [PATCH 18/86] Remove files --- index.d.ts | 44 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6226 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 86cae23..0000000 --- a/index.d.ts +++ /dev/null @@ -1,44 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Iterator for iterating over matrix rows. - */ - nditerRows: typeof nditerRows; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 217d33a..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index af5de45..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 80ace71..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 63e3e92ee6975f5e776c0f57b79d4f1575b69452 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:16:23 +0000 Subject: [PATCH 19/86] 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 | 53 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3566 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..217d33a --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..af5de45 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 7726521..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..868c01d --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 43d5baf760911b6acebefb80c254bb31c97dd02d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 18:15:03 +0000 Subject: [PATCH 20/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79bf300..7726521 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 84e5b2b27105bec6f557db8669edfc505c8902b3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 03:12:57 +0000 Subject: [PATCH 21/86] Remove files --- index.d.ts | 256 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6438 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 d5527b5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,256 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 217d33a..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index af5de45..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 868c01d..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 39dc90bb02bb30a7af87c01a949d420077248511 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 03:14:08 +0000 Subject: [PATCH 22/86] 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 | 53 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6210 insertions(+), 3567 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 a6c04b0..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T05:59:56.332Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..217d33a --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..af5de45 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 7726521..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7547750 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 0b43dc831bcc5339841e4ae33fd40a83c9de0880 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 21:09:25 +0000 Subject: [PATCH 23/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79bf300..7726521 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 82d8122491f7989fad5270ff209c820173e19a69 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 23:46:43 +0000 Subject: [PATCH 24/86] Remove files --- index.d.ts | 256 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6438 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 d5527b5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,256 +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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 217d33a..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index af5de45..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7547750..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 3985ee28183e33e67295b49c9e408bc796c9ecb2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 23:47:31 +0000 Subject: [PATCH 25/86] 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 | 53 +- 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 | 96 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3566 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 a59826c..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 9b28b18..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..217d33a --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..af5de45 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 61391fb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,96 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 7726521..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -116,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d4dde6e --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 5661ff3578ca60fd3a8210ae59c0f3a5822b4840 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 08:30:30 +0000 Subject: [PATCH 26/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f948aec..f60134a 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From a8df552376597c9e79025c844b454cd34e749e1f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 08:40:01 +0000 Subject: [PATCH 27/86] Remove files --- index.d.ts | 255 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6437 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 98c4e99..0000000 --- a/index.d.ts +++ /dev/null @@ -1,255 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 217d33a..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var a={};e(a,"nditerColumns",r),e(a,"nditerEntries",s),e(a,"nditerIndices",t),e(a,"nditerRows",d),e(a,"nditer2arrayEach",i),e(a,"nditerValues",n);export{a as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index af5de45..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;22CAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,aAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,eAAAO"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d4dde6e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From db5dc2a81106bbee460b84de32f97b61e7912e2f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 08:40:53 +0000 Subject: [PATCH 28/86] 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 | 53 +- 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 | 105 - package.json | 87 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3576 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 6c8c454..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 302e399..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..e57cb21 --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var m={};e(m,"nditerColumns",r),e(m,"nditerEntries",t),e(m,"nditerIndices",s),e(m,"nditerMatrices",d),e(m,"nditerRows",i),e(m,"nditer2arrayEach",n),e(m,"nditerValues",a);export{m as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ea64ca9 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qjDAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,aAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,eAAAQ"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 77e0b49..0000000 --- a/lib/index.js +++ /dev/null @@ -1,105 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f60134a..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "github:stdlib-js/ndarray-iter-matrices#main", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -117,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3dfa9bb --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 4589f7679cb1e5f033d173f60df7cc83bed268de Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 09:59:48 +0000 Subject: [PATCH 29/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 558d53b..75aca04 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 94e6c48ff08232aed03124714785f56d03a2e946 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 10:57:27 +0000 Subject: [PATCH 30/86] Remove files --- index.d.ts | 255 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6437 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 98c4e99..0000000 --- a/index.d.ts +++ /dev/null @@ -1,255 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e57cb21..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var m={};e(m,"nditerColumns",r),e(m,"nditerEntries",t),e(m,"nditerIndices",s),e(m,"nditerMatrices",d),e(m,"nditerRows",i),e(m,"nditer2arrayEach",n),e(m,"nditerValues",a);export{m as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ea64ca9..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qjDAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,aAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,eAAAQ"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3dfa9bb..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e912d5cf00554f611fbcf5b2a78c87d5c24322ae Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 10:58:19 +0000 Subject: [PATCH 31/86] 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 | 53 +- 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 | 114 - package.json | 88 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3586 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 b70f25b..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,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 29d0846..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..8300779 --- /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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var l={};e(l,"nditerColumns",r),e(l,"nditerEntries",t),e(l,"nditerIndices",s),e(l,"nditerMatrices",d),e(l,"nditerRowEntries",i),e(l,"nditerRows",n),e(l,"nditer2arrayEach",a),e(l,"nditerValues",m);export{l as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c0bf35 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;uwDAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,aAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,eAAAS"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 279179e..0000000 --- a/lib/index.js +++ /dev/null @@ -1,114 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 75aca04..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,67 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "github:stdlib-js/ndarray-iter-matrices#main", - "@stdlib/ndarray-iter-row-entries": "github:stdlib-js/ndarray-iter-row-entries#main", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -118,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d149786 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 58267ec6403e1218f1497e5edf4fa34ab694fe54 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 22:21:55 +0000 Subject: [PATCH 32/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98ff369..4ef8e4c 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 5d4519409eca449a25dc38c821e75a2709516700 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 22:39:41 +0000 Subject: [PATCH 33/86] Remove files --- index.d.ts | 255 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6437 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 98c4e99..0000000 --- a/index.d.ts +++ /dev/null @@ -1,255 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 8300779..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 e 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/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var l={};e(l,"nditerColumns",r),e(l,"nditerEntries",t),e(l,"nditerIndices",s),e(l,"nditerMatrices",d),e(l,"nditerRowEntries",i),e(l,"nditerRows",n),e(l,"nditer2arrayEach",a),e(l,"nditerValues",m);export{l as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1c0bf35..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;uwDAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,aAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,eAAAS"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d149786..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 448817320491672b4d08a7e85c070cb113f4e1c7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 5 Nov 2023 22:40:59 +0000 Subject: [PATCH 34/86] 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 | 53 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6210 insertions(+), 3606 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -125,7 +124,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]. @@ -187,17 +186,17 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..1bd6f1a --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..78067e0 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4ef8e4c..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "github:stdlib-js/ndarray-iter-column-entries#main", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "github:stdlib-js/ndarray-iter-matrix-entries#main", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..cf93fdf --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 93b49eefb0975b75f2978962ab3e92f64193a76b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 11:06:03 +0000 Subject: [PATCH 35/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b447a0f..d6eccb7 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From cc68e281959bb398dd717c9216613bd4bd0ec3e2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 11:27:52 +0000 Subject: [PATCH 36/86] Remove files --- index.d.ts | 255 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6437 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 98c4e99..0000000 --- a/index.d.ts +++ /dev/null @@ -1,255 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1bd6f1a..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 78067e0..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index cf93fdf..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 389a531167d973f7d28b5bee30e3ccc0ccf20a8d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 11:29:18 +0000 Subject: [PATCH 37/86] 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 | 61 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6214 insertions(+), 3610 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -129,7 +128,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]. @@ -191,25 +190,25 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..1bd6f1a --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..78067e0 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d6eccb7..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "github:stdlib-js/ndarray-iter-column-entries#main", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "github:stdlib-js/ndarray-iter-matrix-entries#main", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.2.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..9ce041d --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 ec45c115b594eabc7ae2b569f7a6c6f818ac6b89 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 22:17:57 +0000 Subject: [PATCH 38/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b447a0f..d6eccb7 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From bed65604fd8ac8f43dd85f96447b26c0327dd122 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 22:18:26 +0000 Subject: [PATCH 39/86] Remove files --- index.d.ts | 255 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6437 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 98c4e99..0000000 --- a/index.d.ts +++ /dev/null @@ -1,255 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1bd6f1a..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 78067e0..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 9ce041d..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9fe618f24d292600c04a17dc89fcb5b30f9127d1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 10 Nov 2023 22:20:12 +0000 Subject: [PATCH 40/86] 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 | 61 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6214 insertions(+), 3610 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -129,7 +128,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]. @@ -191,25 +190,25 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 9c11c17..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..1bd6f1a --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..78067e0 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d6eccb7..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "github:stdlib-js/ndarray-iter-column-entries#main", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "github:stdlib-js/ndarray-iter-matrix-entries#main", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.2.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e92f8d0 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 f03b271a5ba68028a293cf04480a931946aa2194 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 22:23:57 +0000 Subject: [PATCH 41/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b447a0f..d6eccb7 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 504e723c2b59e6b221376ecbba60847130c9cefc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 23:47:54 +0000 Subject: [PATCH 42/86] Remove files --- index.d.ts | 429 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6611 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 a2eacb5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1bd6f1a..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 78067e0..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e92f8d0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e78c7bdbc4d0fef04c5b9649fa81aa38e66cca67 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 23:48:56 +0000 Subject: [PATCH 43/86] 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 | 61 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6214 insertions(+), 3610 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -129,7 +128,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]. @@ -191,25 +190,25 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..1bd6f1a --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..78067e0 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d6eccb7..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "github:stdlib-js/ndarray-iter-column-entries#main", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "github:stdlib-js/ndarray-iter-matrix-entries#main", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.2.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4ae335f --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 859997c2554e7c32880e9ff447d69e33185afce4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 14:23:43 +0000 Subject: [PATCH 44/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc211e7..e3ad757 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From ad438b51cbf8c09e24190586a325a677977b1dfa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:50:31 +0000 Subject: [PATCH 45/86] Remove files --- index.d.ts | 429 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6611 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 a2eacb5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1bd6f1a..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 78067e0..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;ytEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4ae335f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From d01cfffdd992ee3d2088c106cdd5b37ab39b35bc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:51:50 +0000 Subject: [PATCH 46/86] 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 | 61 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6214 insertions(+), 3606 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 2aa7ae5..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T06:05:04.217Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 dc2452f..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: '57 21 * * 4' - - # 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 + + ```
@@ -129,7 +128,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]. @@ -191,25 +190,25 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..0c1ceba --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index e3ad757..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.1.0", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "^0.1.0", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/bench": "^0.2.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8f77833 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 7a1f885169e73163fbba3ceb30cb346b19567193 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 08:38:36 +0000 Subject: [PATCH 47/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c875141..64e6e7c 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/symbol-iterator": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From fee91e6fbc09cfa05296def889afe8d1b3c5fdc3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:18:53 +0000 Subject: [PATCH 48/86] Remove files --- index.d.ts | 429 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6611 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 a2eacb5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 0c1ceba..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 03bc65b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8f77833..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2df3d456ef8b78df78d60154e650bb68e1d4ae77 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:19:23 +0000 Subject: [PATCH 49/86] 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 | 61 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6214 insertions(+), 3612 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 2f8aec6..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T05:34:44.260Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 177b7ca..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: '57 21 * * 4' - - # 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 + + ```
@@ -129,7 +128,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]. @@ -191,25 +190,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 e1c0061..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..3fa53e5 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 64e6e7c..dec0493 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.1.0", - "@stdlib/ndarray-iter-columns": "^0.1.0", - "@stdlib/ndarray-iter-entries": "^0.1.0", - "@stdlib/ndarray-iter-indices": "^0.1.0", - "@stdlib/ndarray-iter-matrices": "^0.1.0", - "@stdlib/ndarray-iter-matrix-entries": "^0.1.0", - "@stdlib/ndarray-iter-row-entries": "^0.1.0", - "@stdlib/ndarray-iter-rows": "^0.1.0", - "@stdlib/ndarray-iter-to-array-each": "^0.1.0", - "@stdlib/ndarray-iter-values": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-ndarray-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.1.0", - "@stdlib/assert-is-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-slice": "^0.1.0", - "@stdlib/ndarray-shape": "^0.1.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/symbol-iterator": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7825956 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 fada2d863d42c247df1a770edffc7700cada7888 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 01:26:23 +0000 Subject: [PATCH 50/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 133fe44..c5c6f72 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@stdlib/ndarray-to-array": "^0.1.0", "@stdlib/ndarray-zeros": "^0.1.0", "@stdlib/slice-base-args2multislice": "^0.2.0", - "@stdlib/string-format": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0", "@stdlib/symbol-iterator": "^0.2.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", "@stdlib/utils-keys": "^0.2.0", From e7193af0702ecafbe211f67c755ae1b9804602e0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:57:32 +0000 Subject: [PATCH 51/86] Remove files --- index.d.ts | 429 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6611 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 a2eacb5..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * var ndarray2array = require( `@stdlib/ndarray/to-array` ); - * var nditerRows = require( `@stdlib/ndarray/iter/rows` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3fa53e5..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.1.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.1.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 03bc65b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7825956..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5016e1c9fb29340ec286583c262f7c906d6c7007 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:58:31 +0000 Subject: [PATCH 52/86] 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 | 63 +- 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 | 132 - package.json | 90 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6214 insertions(+), 3620 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 d53f667..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..16cdc2d --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.0-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.0-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.0-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.0-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.0-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.0-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.0-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.0-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.0-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.0-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.0-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index c5c6f72..483be2a 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.0", - "@stdlib/ndarray-iter-columns": "^0.2.0", - "@stdlib/ndarray-iter-entries": "^0.2.0", - "@stdlib/ndarray-iter-indices": "^0.2.0", - "@stdlib/ndarray-iter-matrices": "^0.2.0", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.0", - "@stdlib/ndarray-iter-row-entries": "^0.2.0", - "@stdlib/ndarray-iter-rows": "^0.2.0", - "@stdlib/ndarray-iter-to-array-each": "^0.2.0", - "@stdlib/ndarray-iter-values": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.1.0", - "@stdlib/array-base-zeros": "^0.2.0", - "@stdlib/assert-has-own-property": "^0.2.0", - "@stdlib/assert-is-array": "^0.2.0", - "@stdlib/assert-is-boolean": "^0.2.0", - "@stdlib/assert-is-collection": "^0.2.0", - "@stdlib/assert-is-function": "^0.2.0", - "@stdlib/assert-is-iterator-like": "^0.2.0", - "@stdlib/assert-is-ndarray-like": "^0.2.0", - "@stdlib/assert-is-nonnegative-integer": "^0.2.0", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.0", - "@stdlib/assert-is-number": "^0.2.0", - "@stdlib/assert-is-plain-object": "^0.2.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.2.0", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.0", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.0", - "@stdlib/ndarray-base-numel": "^0.2.0", - "@stdlib/ndarray-base-slice": "^0.2.0", - "@stdlib/ndarray-shape": "^0.2.0", - "@stdlib/ndarray-slice": "^0.1.0", - "@stdlib/ndarray-to-array": "^0.1.0", - "@stdlib/ndarray-zeros": "^0.1.0", - "@stdlib/slice-base-args2multislice": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0", - "@stdlib/symbol-iterator": "^0.2.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", - "@stdlib/utils-keys": "^0.2.0", - "proxyquire": "^2.0.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", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..56444d7 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 0fe47df6271bc38ccf7b9e21063f71e298770427 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:39:27 +0000 Subject: [PATCH 53/86] 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 9af54de..b7ce6b2 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/ndarray-iter@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.2.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { nditer2arrayEach, nditerColumnEntries, nditerColumns, nditerEntries, nditerIndices, nditerMatrices, nditerMatrixEntries, nditerRowEntries, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@esm/index.mjs'; +import { nditer2arrayEach, nditerColumnEntries, nditerColumns, nditerEntries, nditerIndices, nditerMatrices, nditerMatrixEntries, nditerRowEntries, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.2.0-esm/index.mjs'; ``` #### ns @@ -98,7 +98,7 @@ var o = ns; - - - - From dddd66d8d8cca628be5e8b816953121e3dd87a07 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 21:27:25 +0000 Subject: [PATCH 57/86] 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 | 63 +- 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 | 132 - package.json | 90 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 3614 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..8549106 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.0-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index e78441a..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.1", - "@stdlib/ndarray-iter-columns": "^0.2.1", - "@stdlib/ndarray-iter-entries": "^0.2.1", - "@stdlib/ndarray-iter-indices": "^0.2.1", - "@stdlib/ndarray-iter-matrices": "^0.2.1", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.1", - "@stdlib/ndarray-iter-row-entries": "^0.2.1", - "@stdlib/ndarray-iter-rows": "^0.2.1", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.2.0", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-ndarray-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.1", - "@stdlib/assert-is-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.0", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-slice": "^0.2.1", - "@stdlib/ndarray-shape": "^0.2.1", - "@stdlib/ndarray-slice": "^0.2.0", - "@stdlib/ndarray-to-array": "^0.2.0", - "@stdlib/ndarray-zeros": "^0.2.0", - "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/symbol-iterator": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..af83ff3 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 695b2674ea2393d26c6820345768bb424b0d67c5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 22:06:29 +0000 Subject: [PATCH 58/86] 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 e2e865f..e2511dd 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/ndarray-iter@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.2.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { nditer2arrayEach, nditerColumnEntries, nditerColumns, nditerEntries, nditerIndices, nditerMatrices, nditerMatrixEntries, nditerRowEntries, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@esm/index.mjs'; +import { nditer2arrayEach, nditerColumnEntries, nditerColumns, nditerEntries, nditerIndices, nditerMatrices, nditerMatrixEntries, nditerRowEntries, nditerRows, nditerValues } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@v0.2.1-esm/index.mjs'; ``` #### ns @@ -98,7 +98,7 @@ var o = ns; - - - - From 3ad33edd1f0ac2ede1305367f6ee0d107562e1cb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 14:13:19 +0000 Subject: [PATCH 62/86] 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 | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 63 +- 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 | 132 - package.json | 90 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4879 insertions(+), 3616 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 9dac650..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-03-01T06:07:34.040Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..34a7b64 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 07ca0fd..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.1", - "@stdlib/ndarray-iter-columns": "^0.2.1", - "@stdlib/ndarray-iter-entries": "^0.2.1", - "@stdlib/ndarray-iter-indices": "^0.2.1", - "@stdlib/ndarray-iter-matrices": "^0.2.1", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.1", - "@stdlib/ndarray-iter-row-entries": "^0.2.1", - "@stdlib/ndarray-iter-rows": "^0.2.1", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-ndarray-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.1", - "@stdlib/assert-is-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-slice": "^0.2.1", - "@stdlib/ndarray-shape": "^0.2.1", - "@stdlib/ndarray-slice": "^0.2.1", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.2.1", - "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/symbol-iterator": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..457c776 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 f025d4a9e7fe549fb3e01fb1bc82a2467dca396a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 07:45:37 +0000 Subject: [PATCH 63/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6117805..07ca0fd 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@stdlib/ndarray-to-array": "^0.2.1", "@stdlib/ndarray-zeros": "^0.2.1", "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/symbol-iterator": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From 154347b71968c53e32d91821e890f05eb9eb4310 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 13:14:47 +0000 Subject: [PATCH 64/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 34a7b64..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 03bc65b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 457c776..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 336ee00db9e23059e11220cf7bce4f4faa027587 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 13:15:11 +0000 Subject: [PATCH 65/86] 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 | 63 +- 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 | 132 - package.json | 90 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4879 insertions(+), 3619 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 348811b..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T05:23:22.466Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..34a7b64 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 07ca0fd..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.1", - "@stdlib/ndarray-iter-columns": "^0.2.1", - "@stdlib/ndarray-iter-entries": "^0.2.1", - "@stdlib/ndarray-iter-indices": "^0.2.1", - "@stdlib/ndarray-iter-matrices": "^0.2.1", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.1", - "@stdlib/ndarray-iter-row-entries": "^0.2.1", - "@stdlib/ndarray-iter-rows": "^0.2.1", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-ndarray-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.1", - "@stdlib/assert-is-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-slice": "^0.2.1", - "@stdlib/ndarray-shape": "^0.2.1", - "@stdlib/ndarray-slice": "^0.2.1", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.2.1", - "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/symbol-iterator": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..457c776 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 231752bf197404f5a17ee50851a1755a0f9c7fc0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 03:58:57 +0000 Subject: [PATCH 66/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6117805..07ca0fd 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@stdlib/ndarray-to-array": "^0.2.1", "@stdlib/ndarray-zeros": "^0.2.1", "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/symbol-iterator": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From 1f4c5263e0d6b03377264ec6af58c3f51814f6a7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:29:47 +0000 Subject: [PATCH 67/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 34a7b64..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 03bc65b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 457c776..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 04e3f6740c37524c889996c31f3812ea5db49b54 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:30:20 +0000 Subject: [PATCH 68/86] 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 | 63 +- 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 | 132 - package.json | 90 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 3620 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 c71c66f..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));e(r,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));e(r,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));e(r,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));e(r,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));e(r,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));e(r,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));e(r,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));e(r,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));e(r,"nditerValues",require('@stdlib/ndarray-iter-values/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 0ebd546..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..34a7b64 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..03bc65b --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 760856b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,132 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 07ca0fd..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,69 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.1", - "@stdlib/ndarray-iter-columns": "^0.2.1", - "@stdlib/ndarray-iter-entries": "^0.2.1", - "@stdlib/ndarray-iter-indices": "^0.2.1", - "@stdlib/ndarray-iter-matrices": "^0.2.1", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.1", - "@stdlib/ndarray-iter-row-entries": "^0.2.1", - "@stdlib/ndarray-iter-rows": "^0.2.1", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-ndarray-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.1", - "@stdlib/assert-is-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-slice": "^0.2.1", - "@stdlib/ndarray-shape": "^0.2.1", - "@stdlib/ndarray-slice": "^0.2.1", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.2.1", - "@stdlib/slice-base-args2multislice": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/symbol-iterator": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -120,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..457c776 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 dc5a34d6ce50cda9b7c63e020263ab8ce2d9f90c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 00:57:13 +0000 Subject: [PATCH 69/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3b9cee..a11026d 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From c732c9c61d9bd952b92be73bd66dbc6a078e8379 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 00:58:18 +0000 Subject: [PATCH 70/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 34a7b64..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.1-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.1-esm/index.mjs";var o={};e(o,"nditerColumnEntries",t),e(o,"nditerColumns",r),e(o,"nditerEntries",s),e(o,"nditerIndices",i),e(o,"nditerMatrices",d),e(o,"nditerMatrixEntries",n),e(o,"nditerRowEntries",a),e(o,"nditerRows",m),e(o,"nditer2arrayEach",l),e(o,"nditerValues",j);export{o as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 03bc65b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditer2arrayEach","nditerValues"],"mappings":";;qvEAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,eAAAW"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 457c776..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a189a7df8013c82db6aeb95eac5202724d96fd2b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 00:58:51 +0000 Subject: [PATCH 71/86] 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 | 615 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 63 +- 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 | 141 - package.json | 95 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 4257 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 4059ff1..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 ce550e5..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..5a4f7f6 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var h={};e(h,"nditerColumnEntries",t),e(h,"nditerColumns",r),e(h,"nditerEntries",s),e(h,"nditerIndices",i),e(h,"nditerMatrices",d),e(h,"nditerMatrixEntries",n),e(h,"nditerRowEntries",m),e(h,"nditerRows",a),e(h,"nditerSelectDimension",l),e(h,"nditer2arrayEach",o),e(h,"nditerValues",j);export{h as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02848f6 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditer2arrayEach","nditerValues"],"mappings":";;s9EAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,mBAAAW,GAUAV,EAAAD,EAAA,eAAAY"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index c7cb52a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,141 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index a11026d..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-filled": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -125,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2035078 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 9f1e278c20d6813d73e1291904bb5862ff275c41 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 09:14:06 +0000 Subject: [PATCH 72/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1790c0c..b9dbfbf 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 9f80dcf52b28e169298e6d331aa8766442527b4f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 09:19:02 +0000 Subject: [PATCH 73/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 5a4f7f6..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var h={};e(h,"nditerColumnEntries",t),e(h,"nditerColumns",r),e(h,"nditerEntries",s),e(h,"nditerIndices",i),e(h,"nditerMatrices",d),e(h,"nditerMatrixEntries",n),e(h,"nditerRowEntries",m),e(h,"nditerRows",a),e(h,"nditerSelectDimension",l),e(h,"nditer2arrayEach",o),e(h,"nditerValues",j);export{h as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02848f6..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditer2arrayEach","nditerValues"],"mappings":";;s9EAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,mBAAAW,GAUAV,EAAAD,EAAA,eAAAY"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2035078..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 81c639599911fa79a25d32c5531115b471d75b43 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 09:19:54 +0000 Subject: [PATCH 74/86] 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 | 640 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 63 +- 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 | 150 - package.json | 97 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 4293 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 e5cb761..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditerSubarrays",require('@stdlib/ndarray-iter-subarrays/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 e13a6fc..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nsetReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,kBAAmB,QAAS,gCAAiC,CAAE,EAShFD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..506f5c6 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var p={};e(p,"nditerColumnEntries",r),e(p,"nditerColumns",t),e(p,"nditerEntries",s),e(p,"nditerIndices",i),e(p,"nditerMatrices",d),e(p,"nditerMatrixEntries",n),e(p,"nditerRowEntries",a),e(p,"nditerRows",m),e(p,"nditerSelectDimension",l),e(p,"nditerSubarrays",j),e(p,"nditer2arrayEach",o),e(p,"nditerValues",h);export{p as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..097d306 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;mqFAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,kBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,eAAAa"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index d34762b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,150 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditerSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/subarrays} -*/ -setReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index b9dbfbf..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,76 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-subarrays": "github:stdlib-js/ndarray-iter-subarrays#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-filled": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -127,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7e69030 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 74b691ac194dfd1ba61b514e09e6ccbd87f6470e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 11:37:56 +0000 Subject: [PATCH 75/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83676d3..c93ae89 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 713c4e2810a950bbb382846207dd0e3b9f4d6bf1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 11:43:08 +0000 Subject: [PATCH 76/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 506f5c6..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var p={};e(p,"nditerColumnEntries",r),e(p,"nditerColumns",t),e(p,"nditerEntries",s),e(p,"nditerIndices",i),e(p,"nditerMatrices",d),e(p,"nditerMatrixEntries",n),e(p,"nditerRowEntries",a),e(p,"nditerRows",m),e(p,"nditerSelectDimension",l),e(p,"nditerSubarrays",j),e(p,"nditer2arrayEach",o),e(p,"nditerValues",h);export{p as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 097d306..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;mqFAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,kBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,eAAAa"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7e69030..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 192e06ac55dfc67ce6ebe1e7e437d0eb0951b092 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 11:44:04 +0000 Subject: [PATCH 77/86] 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 | 666 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 63 +- 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 | 159 - package.json | 102 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 4333 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 8aaee39..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditerStacks",require('@stdlib/ndarray-iter-stacks/dist'));r(e,"nditerSubarrays",require('@stdlib/ndarray-iter-subarrays/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 2d4ac9b..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nsetReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nsetReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,kBAAmB,QAAS,gCAAiC,CAAE,EAShFD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..1345749 --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",t),e(c,"nditerColumns",r),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerMatrices",d),e(c,"nditerMatrixEntries",n),e(c,"nditerRowEntries",a),e(c,"nditerRows",m),e(c,"nditerSelectDimension",l),e(c,"nditerStacks",j),e(c,"nditerSubarrays",o),e(c,"nditer2arrayEach",h),e(c,"nditerValues",p);export{c as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ed7d2bf --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;u2FAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,kBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,eAAAc"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index e6b24eb..0000000 --- a/lib/index.js +++ /dev/null @@ -1,159 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditerStacks -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/stacks} -*/ -setReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) ); - -/** -* @name nditerSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/subarrays} -*/ -setReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index c93ae89..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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,81 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-stacks": "github:stdlib-js/ndarray-iter-stacks#main", - "@stdlib/ndarray-iter-subarrays": "github:stdlib-js/ndarray-iter-subarrays#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-copy": "^0.2.2", - "@stdlib/array-base-filled": "^0.2.2", - "@stdlib/array-base-put": "^0.0.2", - "@stdlib/array-base-take": "^0.3.0", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-integer-array": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..54c286f --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 1e656b8fca87ae9e00a6f1bf37da637b6927379f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 21:22:09 +0000 Subject: [PATCH 78/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3545e7b..09c8509 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 4f37b2403339ad57e1462935e5b046afc26c0b43 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 21:23:52 +0000 Subject: [PATCH 79/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1345749..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",t),e(c,"nditerColumns",r),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerMatrices",d),e(c,"nditerMatrixEntries",n),e(c,"nditerRowEntries",a),e(c,"nditerRows",m),e(c,"nditerSelectDimension",l),e(c,"nditerStacks",j),e(c,"nditerSubarrays",o),e(c,"nditer2arrayEach",h),e(c,"nditerValues",p);export{c as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ed7d2bf..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;u2FAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,sBAAAO,GAUAN,EAAAD,EAAA,mBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,wBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,kBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,eAAAc"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 54c286f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a195caa0fca1fd4666051fa6ad945915684a6844 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 11 Aug 2024 21:24:21 +0000 Subject: [PATCH 80/86] 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 | 619 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 63 +- 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 | 168 - package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4879 insertions(+), 4298 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -131,7 +128,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]. @@ -196,25 +193,25 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 98ad9b6..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerInterleaveSubarrays",require('@stdlib/ndarray-iter-interleave-subarrays/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditerStacks",require('@stdlib/ndarray-iter-stacks/dist'));r(e,"nditerSubarrays",require('@stdlib/ndarray-iter-subarrays/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 6e1cc79..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nsetReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nsetReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nsetReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,4BAA6B,QAAS,2CAA4C,CAAE,EASrGD,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,kBAAmB,QAAS,gCAAiC,CAAE,EAShFD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..80163ee --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";export{default as nditerInterleaveSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",r),e(c,"nditerColumns",t),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerInterleaveSubarrays",d),e(c,"nditerMatrices",n),e(c,"nditerMatrixEntries",a),e(c,"nditerRowEntries",m),e(c,"nditerRows",l),e(c,"nditerSelectDimension",j),e(c,"nditerStacks",o),e(c,"nditerSubarrays",h),e(c,"nditer2arrayEach",p),e(c,"nditerValues",v);export{c as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..473b237 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nimport nditerInterleaveSubarrays from '@stdlib/ndarray-iter-interleave-subarrays';\nsetReadOnly( ns, 'nditerInterleaveSubarrays', nditerInterleaveSubarrays );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerInterleaveSubarrays","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;olGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,4BAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,wBAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,kBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,eAAAe"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7bfcd5f..0000000 --- a/lib/index.js +++ /dev/null @@ -1,168 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerInterleaveSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays} -*/ -setReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditerStacks -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/stacks} -*/ -setReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) ); - -/** -* @name nditerSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/subarrays} -*/ -setReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 09c8509..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-interleave-subarrays": "github:stdlib-js/ndarray-iter-interleave-subarrays#main", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-stacks": "github:stdlib-js/ndarray-iter-stacks#main", - "@stdlib/ndarray-iter-subarrays": "github:stdlib-js/ndarray-iter-subarrays#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-copy": "^0.2.2", - "@stdlib/array-base-filled": "^0.2.2", - "@stdlib/array-base-put": "^0.0.2", - "@stdlib/array-base-take": "^0.3.0", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-array-like-object": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-integer-array": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-maybe-broadcast-arrays": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..345e941 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 e97d8052df836d5cd6541bdc9ad2d6625b48f55a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Aug 2024 08:31:17 +0000 Subject: [PATCH 81/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3545e7b..09c8509 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 99e0fee25a004c6d359ebeb3f7d378e30ecf928e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Aug 2024 08:35:30 +0000 Subject: [PATCH 82/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 80163ee..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";export{default as nditerInterleaveSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",r),e(c,"nditerColumns",t),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerInterleaveSubarrays",d),e(c,"nditerMatrices",n),e(c,"nditerMatrixEntries",a),e(c,"nditerRowEntries",m),e(c,"nditerRows",l),e(c,"nditerSelectDimension",j),e(c,"nditerStacks",o),e(c,"nditerSubarrays",h),e(c,"nditer2arrayEach",p),e(c,"nditerValues",v);export{c as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 473b237..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nimport nditerInterleaveSubarrays from '@stdlib/ndarray-iter-interleave-subarrays';\nsetReadOnly( ns, 'nditerInterleaveSubarrays', nditerInterleaveSubarrays );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerInterleaveSubarrays","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;olGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,4BAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,wBAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,kBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,eAAAe"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 345e941..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7f3c8ac02513fa8fa2151dedcb523394706228e5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Aug 2024 08:36:11 +0000 Subject: [PATCH 83/86] 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 | 620 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 71 +- 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 | 168 - package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4883 insertions(+), 4303 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -135,7 +132,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]. @@ -200,33 +197,33 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/interleave-subarrays]: https://github.com/stdlib-js/ndarray-iter-interleave-subarrays +[@stdlib/ndarray/iter/interleave-subarrays]: https://github.com/stdlib-js/ndarray-iter-interleave-subarrays/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/select-dimension]: https://github.com/stdlib-js/ndarray-iter-select-dimension +[@stdlib/ndarray/iter/select-dimension]: https://github.com/stdlib-js/ndarray-iter-select-dimension/tree/esm -[@stdlib/ndarray/iter/stacks]: https://github.com/stdlib-js/ndarray-iter-stacks +[@stdlib/ndarray/iter/stacks]: https://github.com/stdlib-js/ndarray-iter-stacks/tree/esm -[@stdlib/ndarray/iter/subarrays]: https://github.com/stdlib-js/ndarray-iter-subarrays +[@stdlib/ndarray/iter/subarrays]: https://github.com/stdlib-js/ndarray-iter-subarrays/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 98ad9b6..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerInterleaveSubarrays",require('@stdlib/ndarray-iter-interleave-subarrays/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditerStacks",require('@stdlib/ndarray-iter-stacks/dist'));r(e,"nditerSubarrays",require('@stdlib/ndarray-iter-subarrays/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 6e1cc79..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nsetReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nsetReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nsetReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,4BAA6B,QAAS,2CAA4C,CAAE,EASrGD,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,kBAAmB,QAAS,gCAAiC,CAAE,EAShFD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..80163ee --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";export{default as nditerInterleaveSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",r),e(c,"nditerColumns",t),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerInterleaveSubarrays",d),e(c,"nditerMatrices",n),e(c,"nditerMatrixEntries",a),e(c,"nditerRowEntries",m),e(c,"nditerRows",l),e(c,"nditerSelectDimension",j),e(c,"nditerStacks",o),e(c,"nditerSubarrays",h),e(c,"nditer2arrayEach",p),e(c,"nditerValues",v);export{c as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..473b237 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nimport nditerInterleaveSubarrays from '@stdlib/ndarray-iter-interleave-subarrays';\nsetReadOnly( ns, 'nditerInterleaveSubarrays', nditerInterleaveSubarrays );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerInterleaveSubarrays","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;olGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,4BAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,wBAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,kBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,eAAAe"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7bfcd5f..0000000 --- a/lib/index.js +++ /dev/null @@ -1,168 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerInterleaveSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays} -*/ -setReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditerStacks -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/stacks} -*/ -setReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) ); - -/** -* @name nditerSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/subarrays} -*/ -setReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 09c8509..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-interleave-subarrays": "github:stdlib-js/ndarray-iter-interleave-subarrays#main", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-stacks": "github:stdlib-js/ndarray-iter-stacks#main", - "@stdlib/ndarray-iter-subarrays": "github:stdlib-js/ndarray-iter-subarrays#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-copy": "^0.2.2", - "@stdlib/array-base-filled": "^0.2.2", - "@stdlib/array-base-put": "^0.0.2", - "@stdlib/array-base-take": "^0.3.0", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-array-like-object": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-integer-array": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-maybe-broadcast-arrays": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..345e941 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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 0b23083f2c20a602c8d7f3d66f75a10195bdec30 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:32:57 +0000 Subject: [PATCH 84/86] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a816c52..de61ec2 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/ndarray-zeros": "^0.3.0", "@stdlib/slice-base-args2multislice": "^0.2.2", "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/symbol-iterator": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 151e747b8500bff2a272d806044b3af46b169781 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:33:45 +0000 Subject: [PATCH 85/86] Remove files --- index.d.ts | 429 ----- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5276 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 56eb759..0000000 --- a/index.d.ts +++ /dev/null @@ -1,429 +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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import nditerColumnEntries = require( '@stdlib/ndarray-iter-column-entries' ); -import nditerColumns = require( '@stdlib/ndarray-iter-columns' ); -import nditerEntries = require( '@stdlib/ndarray-iter-entries' ); -import nditerIndices = require( '@stdlib/ndarray-iter-indices' ); -import nditerMatrices = require( '@stdlib/ndarray-iter-matrices' ); -import nditerMatrixEntries = require( '@stdlib/ndarray-iter-matrix-entries' ); -import nditerRowEntries = require( '@stdlib/ndarray-iter-row-entries' ); -import nditerRows = require( '@stdlib/ndarray-iter-rows' ); -import nditer2arrayEach = require( '@stdlib/ndarray-iter-to-array-each' ); -import nditerValues = require( '@stdlib/ndarray-iter-values' ); - -/** -* Interface describing the `iter` namespace. -*/ -interface Namespace { - /** - * Returns an iterator which returns `[index, column]` pairs for each column in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumnEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, 0 ] - * - * var col = ndarray2array( v[ 1 ] ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, null, 1 ] - * - * col = ndarray2array( v[ 1 ] ); - * // returns [ 2, 4 ] - * - * // ... - */ - nditerColumnEntries: typeof nditerColumnEntries; - - /** - * Returns an iterator which iterates over each column in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerColumns( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 3 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 2, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 7 ] - * - * // ... - */ - nditerColumns: typeof nditerColumns; - - /** - * Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerEntries( x ); - * - * var v = iter.next().value; - * // returns [ [ 0, 0, 0 ], 1 ] - * - * v = iter.next().value; - * // returns [ [ 0, 0, 1 ], 2 ] - * - * v = iter.next().value; - * // returns [ [ 0, 1, 0 ], 3 ] - * - * // ... - */ - nditerEntries: typeof nditerEntries; - - /** - * Returns an iterator which returns indices for use indexing into an ndarray having a specified shape. - * - * @param shape - input shape - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerIndices( x.shape ); - * - * var v = iter.next().value; - * // returns [ 0, 0, 0 ] - * - * v = iter.next().value; - * // returns [ 0, 0, 1 ] - * - * v = iter.next().value; - * // returns [ 0, 1, 0 ] - * - * // ... - */ - nditerIndices: typeof nditerIndices; - - /** - * Returns an iterator which iterates over each matrix in a stack of matrices. - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrices( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrices: typeof nditerMatrices; - - /** - * Returns an iterator which returns `[index, matrix]` pairs for each matrix in a stack of matrices. - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerMatrixEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, null, null ] - * - * var mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 1, 2 ], [ 3, 4 ] ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 1, null, null ] - * - * mat = ndarray2array( v[ 1 ] ); - * // returns [ [ 5, 6 ], [ 7, 8 ] ] - * - * // ... - */ - nditerMatrixEntries: typeof nditerMatrixEntries; - - /** - * Returns an iterator which returns `[index, row]` pairs for each row in a matrix (or stack of matrices). - * - * ## Notes - * - * - Each returned index is a Cartesian index (i.e., an array of subscripts/dimension indices). A dimension index equal to `null` indicates that all values along the respective dimension are included in the returned ndarray. - * - * @param x - input array - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRowEntries( x ); - * - * var v = iter.next().value; - * // returns [...] - * - * var idx = v[ 0 ]; - * // returns [ 0, 0, null ] - * - * var row = ndarray2array( v[ 1 ] ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [...] - * - * idx = v[ 0 ]; - * // returns [ 0, 1, null ] - * - * row = ndarray2array( v[ 1 ] ); - * // returns [ 3, 4 ] - * - * // ... - */ - nditerRowEntries: typeof nditerRowEntries; - - /** - * Returns an iterator which iterates over each row in a matrix (or stack of matrices). - * - * @param x - input value - * @param options - function options - * @param options.readonly - boolean indicating whether returned views should be read-only - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerRows( x ); - * - * var v = iter.next().value; - * // returns - * - * var arr = ndarray2array( v ); - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns - * - * arr = ndarray2array( v ); - * // returns [ 5, 6 ] - * - * // ... - */ - nditerRows: typeof nditerRows; - - /** - * Returns an iterator which converts each iterated ndarray to a generic array. - * - * ## Notes - * - * - If an environment supports `Symbol.iterator` and a provided iterator is iterable, the returned iterator is iterable. - * - * @param iterator - input iterator - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * var ndarray2array = require( '@stdlib/ndarray-to-array' ); - * var nditerRows = require( '@stdlib/ndarray-iter-rows' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] ); - * // returns - * - * var iter = ns.nditer2arrayEach( nditerRows( x ) ); - * - * var v = iter.next().value; - * // returns [ 1, 2 ] - * - * v = iter.next().value; - * // returns [ 3, 4 ] - * - * v = iter.next().value; - * // returns [ 5, 6 ] - * - * // ... - */ - nditer2arrayEach: typeof nditer2arrayEach; - - /** - * Returns an iterator which returns individual elements of a provided ndarray. - * - * @param x - input array - * @param options - function options - * @param options.order - index iteration order - * @returns iterator - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], { - * 'dtype': 'float64' - * }); - * // returns - * - * var iter = ns.nditerValues( x ); - * - * var v = iter.next().value; - * // returns 1 - * - * v = iter.next().value; - * // returns 2 - * - * v = iter.next().value; - * // returns 3 - * - * // ... - */ - nditerValues: typeof nditerValues; -} - -/** -* Multidimensional array iterators. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 80163ee..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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";export{default as nditerInterleaveSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",r),e(c,"nditerColumns",t),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerInterleaveSubarrays",d),e(c,"nditerMatrices",n),e(c,"nditerMatrixEntries",a),e(c,"nditerRowEntries",m),e(c,"nditerRows",l),e(c,"nditerSelectDimension",j),e(c,"nditerStacks",o),e(c,"nditerSubarrays",h),e(c,"nditer2arrayEach",p),e(c,"nditerValues",v);export{c as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 473b237..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nimport nditerInterleaveSubarrays from '@stdlib/ndarray-iter-interleave-subarrays';\nsetReadOnly( ns, 'nditerInterleaveSubarrays', nditerInterleaveSubarrays );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerInterleaveSubarrays","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;olGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,4BAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,wBAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,kBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,eAAAe"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 345e941..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6ce3410c10573478699d3be62db72e0d85de8726 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:34:26 +0000 Subject: [PATCH 86/86] 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 | 715 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 71 +- 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 | 168 - package.json | 105 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4883 insertions(+), 4503 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 1b12b4b..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/ndarray/iter) 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 3fccfe3..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/ndarray/iter) 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 8d209d2..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: '57 21 * * 4' - - # 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 + + ```
@@ -135,7 +132,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]. @@ -200,33 +197,33 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries +[@stdlib/ndarray/iter/column-entries]: https://github.com/stdlib-js/ndarray-iter-column-entries/tree/esm -[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns +[@stdlib/ndarray/iter/columns]: https://github.com/stdlib-js/ndarray-iter-columns/tree/esm -[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries +[@stdlib/ndarray/iter/entries]: https://github.com/stdlib-js/ndarray-iter-entries/tree/esm -[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices +[@stdlib/ndarray/iter/indices]: https://github.com/stdlib-js/ndarray-iter-indices/tree/esm -[@stdlib/ndarray/iter/interleave-subarrays]: https://github.com/stdlib-js/ndarray-iter-interleave-subarrays +[@stdlib/ndarray/iter/interleave-subarrays]: https://github.com/stdlib-js/ndarray-iter-interleave-subarrays/tree/esm -[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices +[@stdlib/ndarray/iter/matrices]: https://github.com/stdlib-js/ndarray-iter-matrices/tree/esm -[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries +[@stdlib/ndarray/iter/matrix-entries]: https://github.com/stdlib-js/ndarray-iter-matrix-entries/tree/esm -[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries +[@stdlib/ndarray/iter/row-entries]: https://github.com/stdlib-js/ndarray-iter-row-entries/tree/esm -[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows +[@stdlib/ndarray/iter/rows]: https://github.com/stdlib-js/ndarray-iter-rows/tree/esm -[@stdlib/ndarray/iter/select-dimension]: https://github.com/stdlib-js/ndarray-iter-select-dimension +[@stdlib/ndarray/iter/select-dimension]: https://github.com/stdlib-js/ndarray-iter-select-dimension/tree/esm -[@stdlib/ndarray/iter/stacks]: https://github.com/stdlib-js/ndarray-iter-stacks +[@stdlib/ndarray/iter/stacks]: https://github.com/stdlib-js/ndarray-iter-stacks/tree/esm -[@stdlib/ndarray/iter/subarrays]: https://github.com/stdlib-js/ndarray-iter-subarrays +[@stdlib/ndarray/iter/subarrays]: https://github.com/stdlib-js/ndarray-iter-subarrays/tree/esm -[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each +[@stdlib/ndarray/iter/to-array-each]: https://github.com/stdlib-js/ndarray-iter-to-array-each/tree/esm -[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values +[@stdlib/ndarray/iter/values]: https://github.com/stdlib-js/ndarray-iter-values/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 a8cdaef..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/ndarray/iter" -%% click B href "https://github.com/stdlib-js/ndarray-iter/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-iter/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-iter/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-iter/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-iter/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter -[production-url]: https://github.com/stdlib-js/ndarray-iter/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-iter/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-iter/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-iter/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-iter/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-iter/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-iter/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 98ad9b6..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,"nditerColumnEntries",require('@stdlib/ndarray-iter-column-entries/dist'));r(e,"nditerColumns",require('@stdlib/ndarray-iter-columns/dist'));r(e,"nditerEntries",require('@stdlib/ndarray-iter-entries/dist'));r(e,"nditerIndices",require('@stdlib/ndarray-iter-indices/dist'));r(e,"nditerInterleaveSubarrays",require('@stdlib/ndarray-iter-interleave-subarrays/dist'));r(e,"nditerMatrices",require('@stdlib/ndarray-iter-matrices/dist'));r(e,"nditerMatrixEntries",require('@stdlib/ndarray-iter-matrix-entries/dist'));r(e,"nditerRowEntries",require('@stdlib/ndarray-iter-row-entries/dist'));r(e,"nditerRows",require('@stdlib/ndarray-iter-rows/dist'));r(e,"nditerSelectDimension",require('@stdlib/ndarray-iter-select-dimension/dist'));r(e,"nditerStacks",require('@stdlib/ndarray-iter-stacks/dist'));r(e,"nditerSubarrays",require('@stdlib/ndarray-iter-subarrays/dist'));r(e,"nditer2arrayEach",require('@stdlib/ndarray-iter-to-array-each/dist'));r(e,"nditerValues",require('@stdlib/ndarray-iter-values/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 6e1cc79..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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nsetReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nsetReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nsetReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nsetReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nsetReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nsetReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nsetReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nsetReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,gBAAiB,QAAS,8BAA+B,CAAE,EAS5ED,EAAaC,EAAI,4BAA6B,QAAS,2CAA4C,CAAE,EASrGD,EAAaC,EAAI,iBAAkB,QAAS,+BAAgC,CAAE,EAS9ED,EAAaC,EAAI,sBAAuB,QAAS,qCAAsC,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,kBAAmB,QAAS,gCAAiC,CAAE,EAShFD,EAAaC,EAAI,mBAAoB,QAAS,oCAAqC,CAAE,EASrFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAK1E,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 25f373d..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +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. -*/ - -/* 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 25f25f1..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +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'; - -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..80163ee --- /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 e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";export{default as nditerColumnEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-column-entries@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";export{default as nditerColumns}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-columns@v0.2.2-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";export{default as nditerEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-entries@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";export{default as nditerIndices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-indices@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";export{default as nditerInterleaveSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-interleave-subarrays@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";export{default as nditerMatrices}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrices@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";export{default as nditerMatrixEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-matrix-entries@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";export{default as nditerRowEntries}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-row-entries@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";export{default as nditerRows}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-rows@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";export{default as nditerSelectDimension}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-select-dimension@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";export{default as nditerStacks}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-stacks@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";export{default as nditerSubarrays}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-subarrays@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";export{default as nditer2arrayEach}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-to-array-each@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";export{default as nditerValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter-values@v0.2.2-esm/index.mjs";var c={};e(c,"nditerColumnEntries",r),e(c,"nditerColumns",t),e(c,"nditerEntries",s),e(c,"nditerIndices",i),e(c,"nditerInterleaveSubarrays",d),e(c,"nditerMatrices",n),e(c,"nditerMatrixEntries",a),e(c,"nditerRowEntries",m),e(c,"nditerRows",l),e(c,"nditerSelectDimension",j),e(c,"nditerStacks",o),e(c,"nditerSubarrays",h),e(c,"nditer2arrayEach",p),e(c,"nditerValues",v);export{c as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..473b237 --- /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) 2023 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* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumnEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/column-entries}\n*/\nimport nditerColumnEntries from '@stdlib/ndarray-iter-column-entries';\nsetReadOnly( ns, 'nditerColumnEntries', nditerColumnEntries );\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nimport nditerColumns from '@stdlib/ndarray-iter-columns';\nsetReadOnly( ns, 'nditerColumns', nditerColumns );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nimport nditerEntries from '@stdlib/ndarray-iter-entries';\nsetReadOnly( ns, 'nditerEntries', nditerEntries );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nimport nditerIndices from '@stdlib/ndarray-iter-indices';\nsetReadOnly( ns, 'nditerIndices', nditerIndices );\n\n/**\n* @name nditerInterleaveSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays}\n*/\nimport nditerInterleaveSubarrays from '@stdlib/ndarray-iter-interleave-subarrays';\nsetReadOnly( ns, 'nditerInterleaveSubarrays', nditerInterleaveSubarrays );\n\n/**\n* @name nditerMatrices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrices}\n*/\nimport nditerMatrices from '@stdlib/ndarray-iter-matrices';\nsetReadOnly( ns, 'nditerMatrices', nditerMatrices );\n\n/**\n* @name nditerMatrixEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/matrix-entries}\n*/\nimport nditerMatrixEntries from '@stdlib/ndarray-iter-matrix-entries';\nsetReadOnly( ns, 'nditerMatrixEntries', nditerMatrixEntries );\n\n/**\n* @name nditerRowEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/row-entries}\n*/\nimport nditerRowEntries from '@stdlib/ndarray-iter-row-entries';\nsetReadOnly( ns, 'nditerRowEntries', nditerRowEntries );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nimport nditerRows from '@stdlib/ndarray-iter-rows';\nsetReadOnly( ns, 'nditerRows', nditerRows );\n\n/**\n* @name nditerSelectDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/select-dimension}\n*/\nimport nditerSelectDimension from '@stdlib/ndarray-iter-select-dimension';\nsetReadOnly( ns, 'nditerSelectDimension', nditerSelectDimension );\n\n/**\n* @name nditerStacks\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/stacks}\n*/\nimport nditerStacks from '@stdlib/ndarray-iter-stacks';\nsetReadOnly( ns, 'nditerStacks', nditerStacks );\n\n/**\n* @name nditerSubarrays\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/subarrays}\n*/\nimport nditerSubarrays from '@stdlib/ndarray-iter-subarrays';\nsetReadOnly( ns, 'nditerSubarrays', nditerSubarrays );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nimport nditer2arrayEach from '@stdlib/ndarray-iter-to-array-each';\nsetReadOnly( ns, 'nditer2arrayEach', nditer2arrayEach );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nimport nditerValues from '@stdlib/ndarray-iter-values';\nsetReadOnly( ns, 'nditerValues', nditerValues );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","nditerColumnEntries","nditerColumns","nditerEntries","nditerIndices","nditerInterleaveSubarrays","nditerMatrices","nditerMatrixEntries","nditerRowEntries","nditerRows","nditerSelectDimension","nditerStacks","nditerSubarrays","nditer2arrayEach","nditerValues"],"mappings":";;olGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,sBAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,4BAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,wBAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,kBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,eAAAe"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7bfcd5f..0000000 --- a/lib/index.js +++ /dev/null @@ -1,168 +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'; - -/* -* 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 // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name nditerColumnEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/column-entries} -*/ -setReadOnly( ns, 'nditerColumnEntries', require( '@stdlib/ndarray-iter-column-entries' ) ); - -/** -* @name nditerColumns -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/columns} -*/ -setReadOnly( ns, 'nditerColumns', require( '@stdlib/ndarray-iter-columns' ) ); - -/** -* @name nditerEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/entries} -*/ -setReadOnly( ns, 'nditerEntries', require( '@stdlib/ndarray-iter-entries' ) ); - -/** -* @name nditerIndices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/indices} -*/ -setReadOnly( ns, 'nditerIndices', require( '@stdlib/ndarray-iter-indices' ) ); - -/** -* @name nditerInterleaveSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/interleave-subarrays} -*/ -setReadOnly( ns, 'nditerInterleaveSubarrays', require( '@stdlib/ndarray-iter-interleave-subarrays' ) ); - -/** -* @name nditerMatrices -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrices} -*/ -setReadOnly( ns, 'nditerMatrices', require( '@stdlib/ndarray-iter-matrices' ) ); - -/** -* @name nditerMatrixEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/matrix-entries} -*/ -setReadOnly( ns, 'nditerMatrixEntries', require( '@stdlib/ndarray-iter-matrix-entries' ) ); - -/** -* @name nditerRowEntries -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/row-entries} -*/ -setReadOnly( ns, 'nditerRowEntries', require( '@stdlib/ndarray-iter-row-entries' ) ); - -/** -* @name nditerRows -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/rows} -*/ -setReadOnly( ns, 'nditerRows', require( '@stdlib/ndarray-iter-rows' ) ); - -/** -* @name nditerSelectDimension -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/select-dimension} -*/ -setReadOnly( ns, 'nditerSelectDimension', require( '@stdlib/ndarray-iter-select-dimension' ) ); - -/** -* @name nditerStacks -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/stacks} -*/ -setReadOnly( ns, 'nditerStacks', require( '@stdlib/ndarray-iter-stacks' ) ); - -/** -* @name nditerSubarrays -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/subarrays} -*/ -setReadOnly( ns, 'nditerSubarrays', require( '@stdlib/ndarray-iter-subarrays' ) ); - -/** -* @name nditer2arrayEach -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/to-array-each} -*/ -setReadOnly( ns, 'nditer2arrayEach', require( '@stdlib/ndarray-iter-to-array-each' ) ); - -/** -* @name nditerValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/iter/values} -*/ -setReadOnly( ns, 'nditerValues', require( '@stdlib/ndarray-iter-values' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index de61ec2..8f1e275 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Multidimensional array iterators.", "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", - "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/ndarray-iter-column-entries": "^0.2.2", - "@stdlib/ndarray-iter-columns": "^0.2.2", - "@stdlib/ndarray-iter-entries": "^0.2.2", - "@stdlib/ndarray-iter-indices": "^0.2.2", - "@stdlib/ndarray-iter-interleave-subarrays": "github:stdlib-js/ndarray-iter-interleave-subarrays#main", - "@stdlib/ndarray-iter-matrices": "^0.2.2", - "@stdlib/ndarray-iter-matrix-entries": "^0.2.2", - "@stdlib/ndarray-iter-row-entries": "^0.2.2", - "@stdlib/ndarray-iter-rows": "^0.2.2", - "@stdlib/ndarray-iter-select-dimension": "github:stdlib-js/ndarray-iter-select-dimension#main", - "@stdlib/ndarray-iter-stacks": "github:stdlib-js/ndarray-iter-stacks#main", - "@stdlib/ndarray-iter-subarrays": "github:stdlib-js/ndarray-iter-subarrays#main", - "@stdlib/ndarray-iter-to-array-each": "^0.2.1", - "@stdlib/ndarray-iter-values": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-copy": "^0.2.2", - "@stdlib/array-base-nulls": "github:stdlib-js/array-base-nulls#main", - "@stdlib/array-base-put": "^0.0.2", - "@stdlib/array-base-take": "^0.3.0", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-array-like-object": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-integer-array": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer-array": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-next-cartesian-index": "^0.2.2", - "@stdlib/ndarray-base-normalize-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-slice": "^0.2.2", - "@stdlib/ndarray-maybe-broadcast-arrays": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/ndarray-slice": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/slice-base-args2multislice": "^0.2.2", - "@stdlib/slice-ctor": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/symbol-iterator": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,7 +35,6 @@ "namespace", "ns" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..345e941 --- /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 6ad3245..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +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 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(); -});